From 96e88175691b5a8c49c67c3f672f28e92b165e37 Mon Sep 17 00:00:00 2001 From: robertl Date: Sun, 5 Apr 2009 22:58:07 +0000 Subject: [PATCH] Explictly call usb_set_configuration() on Mac, as we did < 1.3.6, to improve reliability of USB xfers on select Garmins. --- jeeps/gpslibusb.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/jeeps/gpslibusb.c b/jeeps/gpslibusb.c index 34872d695..99a13bb0b 100644 --- a/jeeps/gpslibusb.c +++ b/jeeps/gpslibusb.c @@ -269,6 +269,16 @@ garmin_usb_start(struct usb_device *dev, libusb_unit_data *lud) /* * Hrmph. No iManufacturer or iProduct headers.... */ + + +#if __APPLE__ + // On Leopard, if we don't do an explicit set_configuration, some + // devices will work only the first time after a reset. + if (usb_set_configuration(udev, 1) < 0) { + fatal("usb_set_configuration failed: %s\n", usb_strerror()); + }; +#endif + #if 0 if (usb_set_configuration(udev, 1) < 0) { #if __linux__ -- 2.30.2